package cn.earl.springboot.entity;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.validator.constraints.NotBlank;

import com.alibaba.fastjson.annotation.JSONField;

/**
 * 投诉
 * 
 * @author ASUS-A455L
 *
 */
@Entity
@Table(name = "tb_complaint")
public class Complaint {
	@Id
	@GeneratedValue
	private int id;

	// 交易id
	@OneToOne(targetEntity = Demand.class)
	@JoinColumn(name = "demand_id")
	private int deman_id;

	// 创建时间
	@JSONField(format = Global.DATE_FORMAT)
	private Date create_time;

	// 投诉者id
	@OneToOne(targetEntity = User.class)
	@JoinColumn(name = "complainant")
	private int complainant;

	// 理由
	@NotBlank
	private String reason;

	// 仲裁结果
	private int result;

	// 投诉状态
	private int status;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getDeman_id() {
		return deman_id;
	}

	public void setDeman_id(int deman_id) {
		this.deman_id = deman_id;
	}

	public Date getCreate_time() {
		return create_time;
	}

	public void setCreate_time(Date create_time) {
		this.create_time = create_time;
	}

	public int getComplainant() {
		return complainant;
	}

	public void setComplainant(int complainant) {
		this.complainant = complainant;
	}

	public String getReason() {
		return reason;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}

	public int getResult() {
		return result;
	}

	public void setResult(int result) {
		this.result = result;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

}
